﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucTop" TagName="Top" Src="../Common/Inc/Top.ascx" %>
<%@ Register TagPrefix="ucMenu" TagName="Menu" Src="../Common/Inc/Menu.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Mny2018r.aspx.cs" Inherits="Updms.Mny.Mny2018r" %>
<%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms" TagPrefix="chartfx7" %>
<%@ Register Assembly="ChartFX.WebForms.Adornments" Namespace="ChartFX.WebForms.Adornments" TagPrefix="chartfxadornments" %>
<%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms.Galleries" TagPrefix="chartfx7galleries" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>▒ UPDMS [Mny2018r] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>

<table id="table_frame">
	<tr>
		<td id="top_area" colspan="2">
			<!-- Top 시작 -->
			<ucTop:Top id="Top" runat="server"></ucTop:Top>
			<!-- Top 끝 -->
		</td>
	</tr>
	<tr>
		<td id="menu_area" runat="server">
			<!-- 메뉴 시작 -->
			<ucMenu:Menu id="Menu" runat="server"></ucMenu:Menu>
			<!-- 메뉴 끝 -->
		</td>
		<td id="contents_area">
			<!-- 제목 시작 -->
			<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Mny2018r" runat="server"></ucTabTitle:TabTitle>
			<!-- 제목 끝 -->
			<!-- AJAX 시작 -->
			<asp:UpdatePanel ID="UpdatePanel1" runat="server">
			<Triggers>
				<asp:PostBackTrigger ControlID="ibtn_excel"/>
				<asp:PostBackTrigger ControlID="ibtn_close"/>
			</Triggers>
			<ContentTemplate>
			<!-- 버튼 시작 -->
			<div class="button_area">
				<asp:linkbutton id="ibtn_excel" Text="엑셀" runat="server" CssClass="ibtn ibtn_excel" OnClick="ibtn_excel_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_ftp" Text="아이폰" runat="server" CssClass="ibtn ibtn_phone" OnClientClick="return chkFtpTransfer();" OnClick="ibtn_ftp_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_close" Text="닫기" runat="server" CssClass="ibtn ibtn_close" OnClientClick="javascript:window.close();return false;"></asp:linkbutton>
				<asp:linkbutton id="ibtn_search" Text="검색" runat="server" CssClass="ibtn ibtn_search" OnClick="ibtn_search_Click"></asp:linkbutton>
			</div>
			<!-- 버튼 끝 -->			
			<!-- 검색 시작 -->
			<table class="table_search">
				<tr>
					<td class="lbl" width="15%"><asp:Literal ID="ltr_search_base_ym" Text="기준년월" runat="server" /></td>
					<td class="ctl" width="35%">
						<ul class="horizontal">
							<li style="padding:0 1px 0 0"><asp:DropDownList id="ddl_search_base_year" runat="server" CssClass="ddl"></asp:DropDownList></li>
							<li style="padding:0 2px 0 0"><asp:dropdownlist id="ddl_search_base_month" runat="server" CssClass="ddl">
										<asp:ListItem Value="01">01</asp:ListItem>
										<asp:ListItem Value="02">02</asp:ListItem>
										<asp:ListItem Value="03">03</asp:ListItem>
										<asp:ListItem Value="04">04</asp:ListItem>
										<asp:ListItem Value="05">05</asp:ListItem>
										<asp:ListItem Value="06">06</asp:ListItem>
										<asp:ListItem Value="07">07</asp:ListItem>
										<asp:ListItem Value="08">08</asp:ListItem>
										<asp:ListItem Value="09">09</asp:ListItem>
										<asp:ListItem Value="10">10</asp:ListItem>
										<asp:ListItem Value="11">11</asp:ListItem>
										<asp:ListItem Value="12">12</asp:ListItem>
									</asp:dropdownlist></li>
							<li>
								<asp:linkbutton id="ibtn_prev_month" ToolTip="전월" runat="server" OnClick="ibtn_prev_month_Click"><img src="../Common/Images/arrow_rect_left.gif" alt="전월" /></asp:linkbutton>
								<asp:linkbutton id="ibtn_this_month" ToolTip="당월" runat="server" OnClick="ibtn_this_month_Click"><img src="../Common/Images/control_rect_stop.gif" alt="당월" /></asp:linkbutton>
								<asp:linkbutton id="ibtn_next_month" ToolTip="차월" runat="server" OnClick="ibtn_next_month_Click"><img src="../Common/Images/arrow_rect_right.gif" alt="차월" /></asp:linkbutton>
							</li>
						</ul>
					</td>
					<td class="lbl" width="15%"><asp:Literal ID="ltr_detail_hide" Text="디테일 숨김" runat="server" /></td>
					<td class="ctl" width="35%">
						<a href="javascript:void(0);" onclick="toggleObj('div_out_amount_list_by_account');toggleObj('div_over_budget_pie');">
							<span onclick="toggleStr(this, 'detailHide', 'detailShow');" title="Hide" style="width:60px;cursor:pointer;">
								<span id="detailShow" style="width: 16px; display: block;" class="sbtn sbtn_favorite_y"></span>
								<span id="detailHide" style="width: 16px; display: none;" class="sbtn sbtn_favorite_n"></span>
							</span>
						</a>
					</td>
				</tr>
			</table>
			<!-- 검색 끝 -->
			<!-- 디테일1 시작 -->
			<!-- 디테일1 끝 -->
			<!-- 리스트셋 시작 -->
			<table id="table_list_set" cellspacing="0" cellpadding="0" width="100%" border="0" runat="server">
				<tr>
					<td colspan="3"><div class="sub_title_icon"><asp:Literal ID="ltr_stitle_in" Text="수입" runat="server" /></div>
						<asp:GridView ID="gv_income" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="gv_income_RowDataBound">
							<Columns>
								<asp:BoundField DataField="Reg_Dt" HeaderText="등록일" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="10%" />
								</asp:BoundField>
								<asp:BoundField DataField="Account_Nm" HeaderText="계정" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" Width="14%" />
								</asp:BoundField>
								<asp:BoundField DataField="Contents" HeaderText="내용" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" Width="24%" />
								</asp:BoundField>
								<asp:BoundField DataField="Amount" HeaderText="금액" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Right" Width="14%" />
								</asp:BoundField>
								<asp:BoundField DataField="Remark" HeaderText="비고" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" Width="24%" />
								</asp:BoundField>
								<asp:BoundField DataField="Total_Amt" HeaderText="합계" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Font-Bold="true" Width="14%" />
								</asp:BoundField>								
							</Columns>
							<EmptyDataTemplate>
								<div id="no_data"></div>
							</EmptyDataTemplate>
						</asp:GridView><br/>
					</td>
				</tr>
				<tr>
					<td width="60%" valign="top"><div class="sub_title_icon"><asp:Literal ID="ltr_stitle_out_by_budget" Text="예산대비지출" runat="server" /></div>
						<asp:GridView ID="gv_out_by_budget" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="gv_out_by_budget_RowDataBound" DataKeyNames="Class,Account" ShowFooter="true">
							<Columns>
								<asp:BoundField DataField="Class" HeaderText="Class(X)" Visible="False" />
								<asp:BoundField DataField="Class_Nm" HeaderText="구분" HtmlEncode="False" >
									<ItemStyle Width="10%" HorizontalAlign="Center" />
								</asp:BoundField>
								<asp:BoundField DataField="Account" HeaderText="Account(X)" Visible="False" />
								<asp:BoundField DataField="Account_Nm" HeaderText="계정" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" Width="30%" Height="17" />
								</asp:BoundField>
								<asp:BoundField DataField="Budget" HeaderText="예산" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Right" Width="14%" />
								</asp:BoundField>
								<asp:BoundField DataField="Out_Amount" HeaderText="나간돈" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Right" Width="14%" />
								</asp:BoundField>
								<asp:BoundField DataField="Balance_Amount" HeaderText="남은돈" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Right" Width="14%" />
								</asp:BoundField>
								<asp:BoundField HeaderText="상세" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="8%" />
								</asp:BoundField>
							</Columns>
							<EmptyDataTemplate>
								<div id="no_data"></div>
							</EmptyDataTemplate>
						</asp:GridView>
					</td>
					<td width="1%">&nbsp;</td>
					<td width="39%" valign="top">
						<!-- 예산대비지출금액챠트 시작(1행 = 22px) -->
						<div class="sub_title_icon"><asp:Literal ID="ltr_stitle_out_by_budget_chart" Text="예산대비지출챠트" runat="server" /></div>
						<table class="default">
							<tr>
								<td class="td_box"><div style="height:24px"></div><center>
									<chartfx7:Chart ID="chart_budget_radial" runat="server" Height="800px" Palette="DarkPastels.Pastels" Width="480px" ImageSettings-Interactive="False" PlotAreaMargin-Top="-1">
										<AxisY>
											<Grids Major-Style="Dash" Interlaced="True"></Grids>
											<LabelsFormat CustomFormat="###,###,##0" />
										</AxisY>

										<AxisX Title-Text="">
										<Grids Major-Visible="False"></Grids>
										</AxisX>
										<SpecialObjects>
											<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
												Type="None">
											</chartfxadornments:SimpleBorder>
											<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
												ColorFrom="Transparent" EffectArea="0">
											</chartfxadornments:GradientBackground>
											<chartfx7galleries:Bar>
											</chartfx7galleries:Bar>
										</SpecialObjects>
										<Series>
											<chartfx7:SeriesAttributes Text="나간돈" />
											<chartfx7:SeriesAttributes Stacked="True" Text="남은돈" />
											<chartfx7:SeriesAttributes />
										</Series>
										<AllSeries Gallery="Gantt" BarShape="Cylinder">
										</AllSeries>
										<LegendBox Dock="Top" Visible="False">
										</LegendBox>
										</chartfx7:Chart></center>
								</td>
							</tr>
						</table>
						<!-- 예산대비지출금액챠트 끝 -->
					</td>				
				</tr>
				<tr>
					<td colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top">
						<div id="div_out_amount_list_by_account" style="display:block;">
						<!-- 계정별상세리스트 시작 -->
						<div class="sub_title_icon"><asp:Literal ID="ltr_amount_list_by_account" Text="계정별상세리스트" runat="server" /> ( <asp:Label id="lbl_account_nm" runat="server"></asp:Label> )</div>
						<asp:GridView ID="gv_amount_list_by_account" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="gv_amount_list_by_account_RowDataBound" ShowFooter="true">
							<Columns>
								<asp:BoundField DataField="Base_Dt" HeaderText="기준년월" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="16%" />
								</asp:BoundField>
								<asp:BoundField DataField="Account_Nm" HeaderText="계정" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" Width="21%" />
								</asp:BoundField>
								<asp:BoundField DataField="Flag_Nm" HeaderText="구분" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="8%" />
								</asp:BoundField>
								<asp:BoundField DataField="Reg_Dt" HeaderText="결제일" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="14%" />
								</asp:BoundField>								
								<asp:BoundField DataField="Contents" HeaderText="내용" HtmlEncode="False" >
									<HeaderStyle CssClass="balloon" />
									<ItemStyle HorizontalAlign="Left" Width="28%" />
								</asp:BoundField>
								<asp:BoundField DataField="Amount" HeaderText="금액" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Right" Width="13%" />
								</asp:BoundField>
							</Columns>
							<EmptyDataTemplate>
								<div id="no_data"></div>
							</EmptyDataTemplate>
						</asp:GridView>
						<!-- 계정별상세리스트 끝 -->
						<div style="margin:10px;"></div>
						<!-- 계정별상세리스트(전월) 시작 -->
						<div class="sub_title_icon"><asp:Literal ID="ltr_pre_month_amount_list_by_account" Text="계정별상세리스트(전월)" runat="server" /> ( <asp:Label id="lbl_pre_month_account_nm" runat="server"></asp:Label> )</div>
						<asp:GridView ID="gv_pre_month_amount_list_by_account" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="gv_pre_month_amount_list_by_account_RowDataBound" ShowFooter="true">
							<Columns>
								<asp:TemplateField HeaderText="S">
									<ItemTemplate>
										<asp:CheckBox ID="cb_select" runat="server" AutoPostBack="True" OnCheckedChanged="cb_select_CheckedChanged" />
									</ItemTemplate>
									<ItemStyle HorizontalAlign="Center" Width="4%" />
								</asp:TemplateField>
								<asp:BoundField DataField="Base_Dt" HeaderText="기준년월" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="12%" />
								</asp:BoundField>
								<asp:BoundField DataField="Account_Nm" HeaderText="계정" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" Width="21%" />
								</asp:BoundField>
								<asp:BoundField DataField="Flag_Nm" HeaderText="구분" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="8%" />
								</asp:BoundField>
								<asp:BoundField DataField="Reg_Dt" HeaderText="결제일" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="14%" />
								</asp:BoundField>								
								<asp:BoundField DataField="Contents" HeaderText="내용" HtmlEncode="False" >
									<HeaderStyle CssClass="balloon" />
									<ItemStyle HorizontalAlign="Left" Width="28%" />
								</asp:BoundField>
								<asp:BoundField DataField="Amount" HeaderText="금액" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Right" Width="13%" />
								</asp:BoundField>
							</Columns>
							<EmptyDataTemplate>
								<div id="no_data"></div>
							</EmptyDataTemplate>
						</asp:GridView>
						<!-- 계정별상세리스트(전월) 끝 -->
						</div>
					</td>
					<td></td>
					<td valign="top">
						<!-- 예산초과계정분포챠트 시작 -->
						<div id="div_over_budget_pie" style="display:block;">
						<div class="sub_title_icon"><asp:Literal ID="ltr_stitle_overflow_budget_chart" Text="예산초과계정분포도" runat="server" /></div>
						<table class="default">
							<tr>
								<td class="td_box">
									<chartfx7:chart id="chart_over_budget" runat="server" height="300px" width="480px" Palette="DarkPastels.Pastels" ImageSettings-Interactive="False">
										<AxisY Title-Text="금액 (원)">
										<Grids Major-Style="Dash" Interlaced="True"></Grids>
											<LabelsFormat CustomFormat="###,###,##0" />
										</AxisY>

										<AxisX Title-Text="">
										<Grids Major-Visible="False"></Grids>
										</AxisX>

										<AllSeries PointLabels-Visible="True" Gallery="Doughnut" PointLabels-Font="Tahoma, 8pt" PointLabels-BorderColor="Transparent"></AllSeries>

										<LegendBox Dock="Top" Visible="False"></LegendBox>

										<MainPane AxisY-Title-Text="금액 (원)"></MainPane>
										<SpecialObjects>
											<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
												Type="None">
											</chartfxadornments:SimpleBorder>
											<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
												ColorFrom="Transparent" EffectArea="0">
											</chartfxadornments:GradientBackground>
											<chartfx7galleries:Pie>
											</chartfx7galleries:Pie>
										</SpecialObjects>
										<Series>
											<chartfx7:SeriesAttributes />
											<chartfx7:SeriesAttributes />
											<chartfx7:SeriesAttributes />
										</Series>
										<View3D Enabled="True" />
									</chartfx7:chart>
								</td>
							</tr>
						</table>
						<!-- 예산초과계정분포챠트 끝 -->
						</div>
					</td>
				</tr>
			</table>
			<!-- 리스트셋 끝 -->
			<!-- 설명 시작 -->			
			<!-- 설명 끝 -->
			<!-- 카피라이트 시작 -->
			<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
			<!-- 카피라이트 끝 -->
			<!-- 히든값 시작 -->
			<div id="hdn_data">
				<asp:label id="lbl_pk" runat="server"></asp:label>
				<asp:Label id="lbl_search_flag" runat="server"></asp:Label>
				<INPUT id="h_account" type="hidden" name="h_account" runat="server" />
				<asp:linkbutton id="lbtn_view_detail" runat="server" OnClick="lbtn_view_detail_Click"></asp:linkbutton>
			</div>
			<!-- 히든값 끝 -->
			</ContentTemplate>
			</asp:UpdatePanel>
			<!-- AJAX 끝 -->
		</td>
	</tr>
</table>

<asp:updateprogress AssociatedUpdatePanelID="UpdatePanel1" ID="updateProgress" runat="server">
	<progresstemplate>
		<div id="progressBackgroundFilter"></div>
		<div id="processMessage">
			<div id="processing"></div>
			<img src="../Common/Images/processing_img.gif" />
		</div>
	</progresstemplate>
</asp:updateprogress>

</form>

<script type="text/javascript" language="javascript" defer="defer">
	//계정별지출상세리스트
	function viewDetail( account ) {
		$("h_account").value = account;		
		__doPostBack('lbtn_view_detail','');
	}

	//FTP전송
	function chkFtpTransfer() {
		msgBox.confirm(getMsg(MSG_CFM_025), doFtpTransfer); //전송하시겠습니까?
		return false;
	}
</script>

</body>
</html>